package com.paas.form.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;

import com.paas.form.dao.FormViewResourceDao;
import com.paas.form.entity.FormViewResourceEntity;
import com.paas.form.service.IFormViewResourceService;
import com.paas.common.web.service.BaseServiceImpl;

@Service("formViewResourceService")
public class FormViewResourceServiceImpl  extends BaseServiceImpl<FormViewResourceDao,FormViewResourceEntity> implements IFormViewResourceService{

    @Override
    public FormViewResourceEntity queryByViewFormId(String viewFormId) {
        QueryWrapper<FormViewResourceEntity> queryWrapper = new QueryWrapper();
        queryWrapper.eq("form_id",viewFormId);
        queryWrapper.eq("status","1");
        FormViewResourceEntity formViewResourceEntity = this.baseMapper.selectOne(queryWrapper);
        return formViewResourceEntity;
    }
}